﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCLHBtnBottom.ascx.cs" Inherits="Web.Controls.LAIHAN.UCLHBtnBottom" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>


<script type="text/javascript">

    function Uploader_OnFilesUploadComplete(args) {
        if (typeof (UploadSuccess) == 'function') {
            //UploadSuccess();
        }
        if (typeof (SetSelectValue) == 'function') {

            SetSelectValue(DrpZLLB.GetSelectedIndex());
        }
    }

    function ComboBoxGetSelectIndex() {

        UCLHBtnBottom_ASPxCallbackCommon.PerformCallback("session");;
    }

    function UCLHBtnBottom_ASPxCallbackCommonCall(rs) {

        //alert(rs);
    }

    function OpenGaoPai() {
        var yonghuh;
        if (typeof (GetValue) == 'function') {
            yonghuh = GetValue("yonghuh");
        }
        var bh = txtLaiHanBH.GetValue();
        if (null == bh) bh = "";
        openCenterGaoPai("/Pages/YongShui/13.LAIHANGL/GAOPAIUPLOAD.aspx?wtype=" +
            UCLHBtnBottom_hdCollection.Get("wtype") +
            "&urltype=LH&yonghuh=" +
            yonghuh +
            "&laihanbh=" + bh +
            "&index=" +
            DrpZLLB.GetSelectedIndex() +
            "&txtvalue=" +
            escape(DrpZLLB.GetValue()) +
            "&txtname=" +
            escape(DrpZLLB.GetText()),
            "700px",
            "550px");
    }

    function OpenWenjian(laihanbh, yonghuh) {
        if (typeof (GetValue) == 'function') {
            yonghuh = GetValue("yonghuh");
        }
        var bh = txtLaiHanBH.GetValue();
        var yh = UCLHBtnBottom_hdCollection.Get("yonghuh");
        //alert(yh);
        if (laihanbh == undefined) {
            laihanbh = bh;
        }
        if (yonghuh == undefined || yonghuh == "") {

            yonghuh = yh;
        }
        //alert(laihanbh+"|"+yonghuh);
        openCenter("/Pages/YongShui/13.LAIHANGL/LAIHANWJLB.aspx?laihanbh=" +
            laihanbh +
            "&yonghuh=" +
            yonghuh +
            "&laihanlx=" +
            UCLHBtnBottom_hdCollection.Get("laihanlx"),
            "700px",
            "380px");
    }

    function openCenterGaoPai(openUrl, iWidth, iHeight) {
        var iTop = 0; //(window.screen.availHeight - 45 - iHeight) / 2; //获得窗口的垂直位置;
        var iLeft = 0; // (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
        // window.open(openUrl, window, "dialogHeight=" + iHeight + ";dialogwidth=" + iWidth + ";dialogLeft=" + iLeft + ";dialogTop=" + iTop + ";help=no;resizable=yes;status=no;scrollbars=no;");
        window.open(openUrl, '', 'width=700,height=600');
    }

    function GaoPaiSC() {
        if (typeof (SetSelectValue) == 'function') {

            SetSelectValue(DrpZLLB.GetSelectedIndex());
        }
    }

    $(function() {

        $("body").css("overflow-x", "hidden");

    });

</script>
<style>
    
    
</style>

<dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="UCLHBtnBottom_hdCollection" runat="server"></dx:ASPxHiddenField>

<dx:ASPxCallback ID="UCLHBtnBottom_ASPxCallbackCommon1" ClientInstanceName="UCLHBtnBottom_ASPxCallbackCommon" runat="server" OnCallback="UCLHBtnBottom_ASPxCallbackCommon_Callback" ClientSideEvents-CallbackComplete="function(s,e){UCLHBtnBottom_ASPxCallbackCommonCall(e.result);}"></dx:ASPxCallback>

<table id="table" class="t" style="width: 100%">
    <tr>
        <td align="right">
            <dx:ASPxComboBox ID="DrpZLLB" ClientInstanceName="DrpZLLB" runat="server" Width="270px" ValueType="System.String">
                <ClientSideEvents SelectedIndexChanged="function(s,e){ComboBoxGetSelectIndex()}"/>
            </dx:ASPxComboBox>
        </td>

        <td style="width: 50px">
            <dx:ASPxButton ID="BtnGP" AutoPostBack="false" runat="server" Style="margin-right: 5px;" UseSubmitBehavior="false" Text="高拍">
                <ClientSideEvents Click="function(s,e){OpenGaoPai()}"/>
            </dx:ASPxButton>


        </td>

        <td style="width: 60px">

            <dx:ASPxUploadControl ID="UpLoadFile" runat="server" ClientInstanceName="uploader"
                                  ShowTextBox="false" Theme="Aqua" UploadMode="Standard" ShowClearFileSelectionButton="False"
                                  ShowProgressPanel="True" NullText="" OnFileUploadComplete="uplImage_FileUploadComplete"
                                  Width="0px">
                <BrowseButton Text="上传"></BrowseButton>
                <ClientSideEvents FilesUploadComplete="function(s, e) { Uploader_OnFilesUploadComplete(e); }"
                                  TextChanged="function(s, e) { uploader.Upload();}">
                </ClientSideEvents>
                <ValidationSettings MaxFileSize="4194304">
                </ValidationSettings>
            </dx:ASPxUploadControl>
            <asp:HiddenField ID="WJDZ" runat="server"/>
            <dx:ASPxButton ID="BtnSC" Visible="false" runat="server" UseSubmitBehavior="false" Text="上传">

                <ClientSideEvents
                    Click="function(s, e) { uploader.Upload();}">
                </ClientSideEvents>
            </dx:ASPxButton>
        </td>

        <td style="width: 80px">
            <dx:ASPxButton ID="BtnWJ" AutoPostBack="false" Style="margin-right: 8px;" runat="server" UseSubmitBehavior="false" Text="文件列表">
                <ClientSideEvents Click="function(s,e){
                    OpenWenjian();
                    }"/>
            </dx:ASPxButton>
        </td>
    </tr>
</table>